package org.apache.dubbo;

import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.spi.domain.Robot;
import org.junit.jupiter.api.Test;

/**
 * @author duyutian
 * @version 1.0
 * @date 2020/7/28 11:17
 */
public class App {
    /**
     * 正常spi加载
     */
    @Test
    public void d1() {
        ExtensionLoader<Robot> extensionLoader =
                ExtensionLoader.getExtensionLoader(Robot.class);
        Robot optimusPrime = extensionLoader.getExtension("optimusPrime");
        optimusPrime.sayHello();
        Robot bumblebee = extensionLoader.getExtension("bumblebee");
        bumblebee.sayHello();
    }
}
